BIN      =  bin
TEST     =  test
PROGRAM  =  sched
INCLUDES = -Ilib/list/include \
           -Ilib/parse/include 
SOURCES  =  lib/list/src/*.c \
            lib/parse/src/*.c \
            src/*.c 

$(PROGRAM): 
	@if [ ! -d $(BIN) ]; then mkdir $(BIN); fi 
	@gcc -o $(BIN)/$(PROGRAM) $(INCLUDES) $(SOURCES)
	

test: $(PROGRAM) 
	@cp $(BIN)/$(PROGRAM) $(TEST)/$(PROGRAM)

clean:
	@rm -rf $(BIN)/
	@rm  -f $(TEST)/$(PROGRAM)
